from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from users import views

urlpatterns = [

    # 判断用户名是否存在的路由你
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),

    # 判断手机号是否存在的路由
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.UsermobileCountView.as_view()),

    # 用户注册的视图
    url(r'^users/$', views.UserView.as_view()),

    # 登录 obtain_jwt_token: 登录视图(登录接口)
    url(r'^authorizations/$', obtain_jwt_token),

    # 用户个人详细信息的路由
    url(r'^user/$', views.UserDetailView.as_view()),

    # 更改用户邮箱的路由
    url(r'^email/$', views.EmailView.as_view()),

    # 用户邮箱激活
    url(r'^email/verification/$', views.VerifyEmailView.as_view()),

]
